import router from "@/router/index.js";
// import { useRouter } from "vue-router";
//定义路由守卫

router.beforeEach(async (to, from) => {
    let token = sessionStorage.getItem("cgToken");
    if(!token){
        if(to.path !== "/login"){
             return{
                path:"/login"
             }
        }
       
    }
});
